package cate.common.table.guild.fairyland.rank;

import cate.common.table.EExcelRowClass;
import cate.common.table.ESheet;

@EExcelRowClass(note = "公会秘境-排行奖励 Sheet")
public class GuildFairyRankRewardSheet extends ESheet<GuildFairyRankRewardRow> {
    @Override
    public String getSheetName() {
        return "排行奖励";
    }

    /**
     * 根据排行获取配置
     *
     * @param bossBaseId BOSS基础配置ID
     * @param rank       排行
     */
    public GuildFairyRankRewardRow getRowByRank(int bossBaseId, int rank) {
        return getList().stream()
                .filter(row -> row.bossBaseId == bossBaseId && rank >= row.start && rank <= row.end)
                .findAny()
                .orElse(null);
    }
}
